<template>
	<view class="swiper-box" :class="[!modelData.effect3d ? 'img-swiper' : '']">
		<u-swiper
			:height="!modelData.effect3d ? '340' : '250'"
			:interval="modelData.interval * 1000"
			:list="modelData.bannerList"
			name="img"
			:indicator-pos="modelData.indicatorPos"
			:autoplay="modelData.autoplay"
			:effect3d="modelData.effect3d"
			:mode="modelData.mode"
			bg-color="#ffffff"
		></u-swiper>
	</view>
</template>

<script>
export default {
	props: {
		modelData: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	data() {
		return {
			effect3d: true,
			list: [
				{
					image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
					title: '昨夜星辰昨夜风，画楼西畔桂堂东'
				},
				{
					image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
					title: '身无彩凤双飞翼，心有灵犀一点通'
				},
				{
					image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
					title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
				}
			]
		};
	}
};
</script>

<style lang="scss">
.swiper-box {
	background-color: #ffffff;
}
.img-swiper {
	width: 706upx;
	margin: 0 auto;
}
</style>
